package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntyNameUsesPK implements Serializable {
    public Long entityId;
    public Long entityNameId;
    public Long entityVersionNum;
    public String use;

    public RimCoreEntyNameUsesPK() {
    }

    public RimCoreEntyNameUsesPK(Long entityId, Long entityNameId, 
                          Long entityVersionNum, String use) {
        this.entityId = entityId;
        this.entityNameId = entityNameId;
        this.entityVersionNum = entityVersionNum;
        this.use = use;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntyNameUsesPK) {
            final RimCoreEntyNameUsesPK otherEntyNameUsesPK = (RimCoreEntyNameUsesPK) other;
            final boolean areEqual = 
                (otherEntyNameUsesPK.entityId.equals(entityId) && otherEntyNameUsesPK.entityNameId.equals(entityNameId) && otherEntyNameUsesPK.entityVersionNum.equals(entityVersionNum) && otherEntyNameUsesPK.use.equals(use));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
